package org.fast.develop.logicflow.runtime.expression;

/**
 * 项 目 名：gs-tto-data-mapping
 * 源文件名：com.geekstorm.tto.datamapping.core.expression.ExpressionSetInvocation
 * 文件版本：1.0.0
 * 创建人： 莫寅
 * 创建日期：2020-07-23 11:32
 * 修改作者：莫寅
 * 修改日期：2020-07-23 11:32
 * 文件描述：
 * By：2020 © CompanyName  , Inc. All Rights Reserved.
 */

import javax.el.ELContext;
import javax.el.ValueExpression;

/**
 * Class responsible for handling Expression.setValue() invocations.
 *
 * @author Daniel Meyer
 */
public class ExpressionSetInvocation extends ExpressionInvocation {

	protected final Object value;

	protected ELContext elContext;

	public ExpressionSetInvocation(ValueExpression valueExpression, ELContext elContext, Object value) {
		super(valueExpression);
		this.value = value;
		this.elContext = elContext;
		this.invocationParameters = new Object[] { value };
	}

	@Override
	protected void invoke() {
		valueExpression.setValue(elContext, value);
	}

}
